package com.kithly.model;

import java.io.Serializable;

import com.kithly.model.requests.ClientRequest;
import com.kithly.model.requests.ConnectionAddCategoryRequest;

public class ClientQuestion implements Serializable {

	private static final long serialVersionUID = -1124020548556380361L;

	private long questionID;
	private String questionText = "";
	private String yesResourceURL = "";
	private String noResourceURL = "";
	private ClientRequest noRequest = new ConnectionAddCategoryRequest();
	private ClientRequest yesRequest = new ConnectionAddCategoryRequest();
	private ClientPlan clientPlan;
	private boolean viewed;
	
	public ClientQuestion(long questionID, String questionText, ClientRequest noRequest, 
			ClientRequest yesRequest, String yesResourceURL, String noResourceURL) {
		super();
		this.questionID = questionID;
		this.questionText = questionText;
		this.noRequest = noRequest;
		this.yesRequest = yesRequest;
		this.yesResourceURL = yesResourceURL;
		this.noResourceURL = noResourceURL;
	}

	public ClientQuestion() {
		super();
	}

	public long getQuestionID() {
		return questionID;
	}

	public void setQuestionID(long questionID) {
		this.questionID = questionID;
	}

	public String getQuestionText() {
		return questionText;
	}

	public void setQuestionText(String questionText) {
		this.questionText = questionText;
	}

	public ClientRequest getNoRequest() {
		return noRequest;
	}

	public void setNoRequest(ClientRequest noRequest) {
		this.noRequest = noRequest;
	}

	public ClientRequest getYesRequest() {
		return yesRequest;
	}

	public void setYesRequest(ClientRequest yesRequest) {
		this.yesRequest = yesRequest;
	}
	
	public String getYesResourceURL() {
		return yesResourceURL;
	}

	public void setYesResourceURL(String yesResourceURL) {
		this.yesResourceURL = yesResourceURL;
	}

	public String getNoResourceURL() {
		return noResourceURL;
	}

	public void setNoResourceURL(String noResourceURL) {
		this.noResourceURL = noResourceURL;
	}

	public ClientPlan getClientPlan() {
		return clientPlan;
	}

	public void setClientPlan(ClientPlan clientPlan) {
		this.clientPlan = clientPlan;
	}

	public boolean isViewed() {
		return viewed;
	}

	public void setViewed(boolean viewed) {
		this.viewed = viewed;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + (int) (questionID ^ (questionID >>> 32));
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		ClientQuestion other = (ClientQuestion) obj;
		if (questionID != other.questionID)
			return false;
		return true;
	}
}
